#!/bin/bash
# =====================================================================
# DotnetConn Build script
# =====================================================================
# Launches ant with the proper build file and proper classpath
# Pass specific targets as arguments to this build file if needed
# =====================================================================

if [ ! -n "$BCPSDK_HOME" ]
then
        echo 'Please set BCPSDK_HOME env variable pointing to sdk checkout'
        exit 1
fi

export BUILD_HOME=$PWD/../..

source $BUILD_HOME/setenv.sh

if [ ! -n "$JAVA_HOME" ]
then
        echo 'Please set JAVA_HOME env variable pointing to the JDK installation directory'
        exit 1
fi

"$JAVA" -cp "$ANT_CP" org.apache.tools.ant.Main "-Droot.dir=$BUILD_HOME" "-Dsdk.dir=$BCPSDK_HOME" $*

